﻿<?php

    include("db_connection.php"); //db접속파일
$sql = "select * from file_management";
$rs = mysql_query($sql,$connect);

while($result = mysql_fetch_array($rs)){
    $seq = $result[seq];
    $contests = $result[contests];
    $txt_file_name = $result[txt_file_name];
    $translator = $result[translator];

    $xmlList.="<management><seq>$seq</seq><contests>$contests</contests><txt_file_name>$txt_file_name</txt_file_name><translator>$translator</translator></management>";
}
mysql_free_result($rs);
$fp = fopen("management_xml.xml","w");
$xmlDoc="<?xml version='1.0' encoding='euc-kr'?> <root>$xmlList</root>";
fputs($fp, $xmlDoc);
fclose($fp);

?>
